package com.example;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

@EnableDiscoveryClient
@EnableResourceServer
@RefreshScope
@EnableCaching
@EnableAuthorizationServer
@MapperScan("com.example.auth.mapper")
@SpringBootApplication
public class AuthApplication {

    /**
     * http://127.0.0.1:8006/oauth/token?username=user_1&grant_type=password&scope=all&client_id=wuzzClientId&client_secret=wuzzSecret&password=1234567&code=123456
     * 127.0.0.1:8006/oauth/check_token?token=0d496120-976d-40d9-8726-86c3ef96cdad
     * Authorization Bearer token
     * @param args
     */
    public static void main(String[] args) {
        SpringApplication.run(AuthApplication.class, args);
    }
}
